﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using CombatAutomationTheater;

namespace XMLCharSheets.Systems.Pathfinder
{
    /// <summary>
    /// Interaction logic for PrimaryLightRadiusCreationControl.xaml
    /// </summary>
    public partial class LightSourceCreationControl : UserControl
    {
        private LightControlViewModel _viewModel;

        public LightSourceCreationControl()
        {
            InitializeComponent();
            LightType_ComboBox.ItemsSource = PathfinderLightList.PossibleLights;
            
        }


        public LightControlViewModel ViewModel
        {
            get { return _viewModel; }
            set 
            {
                _viewModel = value;
                DataContext = _viewModel;
                SetBackground();
            }
        }

        private void SetBackground()
        {
            if (_viewModel.UseSet)
            {
                SetLight_StackPanel.Background = Brushes.White;
                StepChangeLight_StackPanel.Background = Brushes.LightGray;
            }
            else
            {
                SetLight_StackPanel.Background = Brushes.LightGray;
                StepChangeLight_StackPanel.Background = Brushes.White;
            }

        }

        private void SetStepChanged(object sender, RoutedEventArgs e)
        {
            SetBackground();
        }
    }
}
